//
//  FollowCollectionViewCell.m
//  UI
//
//  Created by 毛健辉 on 16/7/11.
//  Copyright © 2016年 毛健辉. All rights reserved.
//

#import "FollowCollectionViewCell.h"
@implementation FollowCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        _isSelected=NO;
        UIView *baseCircle=({
            UIView *view=[UIView new];
            [self addSubview:view];
            [view mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(self.mas_left);
                make.centerY.equalTo(self.mas_centerY);
                make.size.mas_equalTo(CGSizeMake(16, 16));
            }];
            view.layer.cornerRadius=8;
            view.layer.masksToBounds=YES;
            view.layer.borderWidth=1;
            view.layer.borderColor=[UIColor colorWithRed:166/255.0 green:166/255.0 blue:166/255.0 alpha:1].CGColor;
            view;
        });
        _circleView=({
            UIView *view=[UIView new];
            [baseCircle addSubview:view];
            [view mas_makeConstraints:^(MASConstraintMaker *make) {
                make.center.equalTo(baseCircle);
                make.size.mas_equalTo(CGSizeMake(7, 7));
            }];
            view.layer.cornerRadius=3.5;
            view.layer.masksToBounds=YES;
            view.backgroundColor=[UIColor colorWithRed:166/255.0 green:166/255.0 blue:166/255.0 alpha:1];

            view;
        });
        _titleLabel=({
            UILabel *label=[UILabel new];
            [self addSubview:label];
            [label mas_makeConstraints:^(MASConstraintMaker *make) {
                make.left.equalTo(baseCircle.mas_right).offset(5);
                make.centerY.equalTo(self.mas_centerY);
                make.size.mas_equalTo(CGSizeMake(29, 16));
            }];
            label.font=[UIFont systemFontOfSize:12];
            label;
        });
        
        
    }
    return self;

}
@end
